<template>
  <div class="public-activities">
    <h2>公开活动列表</h2>
    <ul>
      <li v-for="activity in activities" :key="activity.id">
        <router-link :to="{ name: 'activity-detail', params: { id: activity.id } }">
          {{ activity.title }} - {{ activity.date }}
        </router-link>
      </li>
    </ul>
  </div>
</template>

<script>
import activities from '@/assets/hw10_activities.json';

export default {
  data() {
    return {
      activities
    };
  }
};
</script>